//package com.object.configuration.config;
//
//import cn.dev33.satoken.interceptor.SaRouteInterceptor;
//import cn.dev33.satoken.router.SaRouter;
//import cn.dev33.satoken.stp.StpUtil;
//import lombok.extern.log4j.Log4j2;
//import org.springframework.context.annotation.Configuration;
//import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
//import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
//
//import java.util.Arrays;
//
//@Log4j2
//@Configuration
//public class SaTokenConfigure implements WebMvcConfigurer {
//    // 注册Sa-Token的注解拦截器，打开注解式鉴权功能
//    @Override
//    public void addInterceptors(InterceptorRegistry registry) {
//        // 注册路由拦截器，自定义验证规则
//        //在拦截器中设置允许跨域
//
//        // 注册Sa-Token的路由拦截器
//        registry.addInterceptor(new SaRouteInterceptor())
//                .excludePathPatterns("/object/static/**")
//                .excludePathPatterns("/img/***", "/index/***", "/test/**", "/msg/**","/frontend/**","/upload/**")
//                .addPathPatterns("/**");
//    }
//}
